<%@ page language="java"  pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<title>卓越大厦-沈阳外卖网</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="在卓越大厦附近叫外卖，查看卓越大厦附近的餐厅、美食信息" />
		<!-- Bootstrap -->
		<link href="publicui/bootstrap/css/bootstrap.min.css" rel="stylesheet"
			media="screen" />
		<!--[if lt IE 9]>
  <script src="public/js/html5shiv.js"></script>
<![endif]-->
		<!-- application  -->
		<link href="css/head.css" rel="stylesheet" />
		<link href="css/foot.css" rel="stylesheet" />
		<link href="css/restaurant_manager.css" rel="stylesheet" />
	</head>
	<body>

		<!-----nav-->
<s:include value="shopTop.action"></s:include>
		<!---/nav   -->

		<!---/body   -->
		<div class="content">
			<div class="wash-paper clearfix" id="profile">
				<s:include value="/WEB-INF/shopkeeper/menu.jsp" />

				<div class="main-content" >
					<div class="content-header">
						<h2>积盛和 菜单饭店菜单管理</h2>
					</div>

					<div class="content-inner"     >
                    <!-- 
						<div class="alert rating-time-limit-tips">
							请确定送餐速度
						</div>
                       -->
						<div class="order-list"  >
						
							<!--    循环开始   -->
                             <span id="ref_time" ref_time='1364954294000'></span>
                                 <div class="order-block">
                        
                                
                                
                                <div class="order-table-wrapper " >
                                <form action="/shopkeeper_password.action" method="POST" id="pwd">
                                <s:hidden name="id" />
                                <s:hidden name="action" />
											<table class="ml10" border="0" cellspacing="10"
												cellpadding="0">
												<tr class="input_height">
													<td width="180"   >
														
														<label >
                                                        <span  class="red" >*</span>
															原密码
														</label>

													</td>
													<td>
														<s:password id="oldPwd" name="oldPwd" cssClass="input_text" onblur="checkOldPwdAction();"/><span style="color:red" id="oldPwdMsg"></span>
													</td>
												</tr>
												<tr class="input_height">
													<td>
                                                    	<label >
														<span class="red" >*</span>
														
															新密码
														</label>
													</td>
													<td>
														<s:password id="password" name="password" cssClass="input_text"  onkeyup="passwordTest(this)" onblur="checkPasswordAction();"/><span style="color:red" id="passwordMsg"></span>
													</td>
												</tr>
												<tr class="input_height">
													<td>
                                                    <label >
														<span class="red">*</span>
														重复新密码
														</label>
													</td>
													<td>
														<s:password id="passfirm" name="passfirm" cssClass="input_text" onblur="checkPassfirmAction();"/><span style="color:red" id="passfirmMsg"></span>
													</td>
												</tr>
												
												<tr>
													<td colspan="2" class="pl100 pt10">
														<button tabindex="5" type="button" class="btn btn-warning"
															 onclick="VF_pwdflag();">
															保存信息
														</button>
													</td>
												</tr>
											</table>
										</form>
                                       
                                
                                </div>
                        
                              </div>
               <!--    循环结束   -->
							

							</div>

						</div>

					</div>
				</div>
			</div>


<!--   /content  -->
  <s:action name="foot" executeResult="true"></s:action>
</div>
<!--  alert div start---->
<div id="copy_dlg_restaurant"  class="restaurant-hover-dlg right hide" >
  <div class="wrapper dark_shadow">
    <div class="callout_tip"></div>
    <div class="detail"> </div>
  </div>
</div>
<!--  alert div  end ---->
		

		<!---/body   -->


		<script src="publicui/js/jquery-1.8.3.js"></script>
		<script src="publicui/jquery-ui/js/jquery-ui-1.9.2.custom.js"></script>
		<script src="publicui/bootstrap/js/bootstrap.min.js"></script>
		<script src="js/head.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function checkOldPwdAction(){
	if ($('#oldPwd').val() == "") {
    	$('#oldPwdMsg').html('请您填写原密码');
    	return false;
  	}
  	else if(!checkOldPwd()){
  		$('#oldPwdMsg').html('您的密码格式不正确');
    	return false;
  	}
	$('#oldPwdMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
	return true;
}
function checkPasswordAction(){
	if ($('#password').val() == "") {
    	$('#passwordMsg').html('请您填写密码');
    	return false;
  	}
  	if(!checkPassword()){
  		$('#passwordMsg').html('请您按照正确格式填写密码');
    	return false;
  	}
  	$('#passwordMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
  	return true;
}

function checkPassfirmAction(){
	if ($('#passfirm').val() == "") {
    	$('#passfirmMsg').html('请您填写确认密码');
    	return false;
  	}else{
  		if($('#password').val() != $('#passfirm').val()){
  			$('#passfirmMsg').html('确认密码与密码不相同');
  			return false;
  		}
  	}
  	$('#passfirmMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
  	return true;
}
function VF_pwdflag(){
	var check_bl01=checkOldPwdAction();
	var check_bl02=checkPasswordAction();
	var check_bl03=checkPassfirmAction();
	if(check_bl01 && check_bl02 && check_bl03){
		$('#pwd').submit();
	}
}
function checkOldPwd(){
	var password = $('#oldPwd').val();
	var regu =/^[a-zA-Z0-9_]{6,20}$/;
	var re = new RegExp(regu);
	if (re.test(password)) {
   		return true;
	}else{
   		return false;
	}	
}
function checkPassword(){
	var password = $('#password').val();
	var regu =/^[a-zA-Z0-9_]{6,20}$/;
	var re = new RegExp(regu);
	if (re.test(password)) {
   		return true;
	}else{
   		return false;
	}	
}
function passwordTest(obj) {
    var value = obj.val();  
    var result = getResult(value);  
    check(result);  
}  
              
function getResult(value) {  
    if(value.length < 3) {  
        return 0;  
    }  
    var i = 0;  
    if(value.match(/[a-z]/ig)) {  
        i++;  
    }  
    if(value.match(/[0-9]/ig)) {  
        i++;  
    }  
    if(value.match(/(.[^a-z0-9])/ig)) {  
        i++;  
    }  
    if(value.length < 6 && i > 0) {  
        i--  
    }  
    return i;  
}  
function check(num) {  
    if(num == 0) {  
        $("#passwordMsg").html("密码太短");  
    } else if (num == 1) {  
        $("#passwordMsg").html("密码强度差");  
    } else if (num == 2) {  
        $("#passwordMsg").html("密码强度良好");  
    } else if (num == 3) {  
        $("#passwordMsg").html("密码强度高");  
    } else {  
        $("#passwordMsg").html("未知错误");  
    }  
} 
-->
</script>
<s:if test="error!=null&&error!=''">
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">提示</h3>
  </div>
  <div class="modal-body">
    <p><s:fielderror><s:param>error</s:param></s:fielderror></p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
   <!-- <button class="btn btn-primary">确定 </button>   -->
  </div>
</div>
<script type="text/javascript"  >
$('#myModal').modal();
</script>
</s:if>
	</body>
</html>
<!-- haha! everyone is a frontier -->